﻿CREATE TABLE [dbo].[Employees] (
	[ID]    INT   IDENTITY (1, 1) NOT NULL,
	[Title] [int] noT NULL,
	[FirstName]  VARCHAR (75) NOT NULL,
	[Middlename] [varchar](25) NULL,
	[LastName]    VARCHAR (75) not  NULL,
	[DOB] [smalldatetime] NULL,
	[Age] int NULL,
	[IsDOBCulculated] [bit] Not NULL,
	[GenderCode] VARCHAR (2)  Not NULL,
	[DesignationId] [int] NULL,
	[DepartmentId] [int] Not NULL,
	[Location] int null,
	[EmployeeType] int not null,
	[MaritalStatusCode] VARCHAR (2) Not NULL,
	[BloodGpId] int NULL,
	[ReligionCode] VARCHAR (2)  NULL,
	[NationalityCode] VARCHAR (2) Not NULL,

	[HomeAddress] [varchar](250) NOT NULL,
	[HomeCity] [varchar](100) NOT NULL,
	[HomeStateCode] VARCHAR (2)  NULL,
	[HomeStateOther] [varchar](100) NULL,
	[HomeCountryCode]VARCHAR (2)  NOT NULL,
	[HomePinCode] [varchar](10) NULL,
	[HomePhone] [varchar](20) NULL,

	[WorkAddress] [varchar](250) Not NULL,
	[WorkCity] [varchar](100) not NULL,
	[WorkStateCode] VARCHAR (2)  NULL,
	[WorkStateOther] [varchar](100) NULL,
	[WorkCountryCode]VARCHAR (2)  NOT NULL,
	[WorkPinCode] [varchar](10) NULL,
	[WorkPhone] [varchar](20) NULL,
	
	[Mobile] [varchar](20) NULL,

	[Email]  VARCHAR (50) NULL,
	[IsConsultant] [bit] Not NULL,
	[Active] [bit]  Not NULL,
	[Photograph] binary null,
	[TxnCrUser]         VARCHAR (20) NULL, 
	[TxnCrDate]         DATETIME     NULL,
	[TxnUser]           VARCHAR (20)  NULL,
	[Txndate]           DATETIME     NULL
)
Go
ALTER TABLE [dbo].[Employees]
	ADD CONSTRAINT [PK_Employees]
	PRIMARY KEY ([ID])


